package com.eazyimage.lab.controller;

import com.eazyimage.lab.entity.Response;
import com.eazyimage.lab.entity.Dataset;
import com.eazyimage.lab.service.DatasetMessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.eazyimage.lab.service.SH256Service.getSHA256Str;


@RestController
public class DatasetMessController {
    @Autowired
    DatasetMessService service;

    @RequestMapping("/getdatasetmess")
    public Response getdatasetmess(@RequestParam("username") String username,
                                @RequestParam("password") String password){
        List<Dataset> datamess = service.datasetmess(username,password);
        if (datamess!=null){
            return Response.success(datamess);
        }
        return Response.fail();
    }

}
